home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / envy / patches / fglrx-2.6.20.patch
Encoding:
Text File  |  2007-03-29  |  2.2 KB  |  91 lines

  1. --- firegl_public.c.orig    2007-03-29 10:37:48.000000000 +0900
  2. +++ firegl_public.c    2007-03-29 11:08:33.000000000 +0900
  3. @@ -173,6 +173,10 @@
  4.  
  5.  #include <linux/kmod.h>
  6.  
  7. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
  8. +#include <linux/freezer.h>
  9. +#endif
  10. +
  11.  // To enable DBG_* macros set this variable to nonzero
  12.  #define DRM_DEBUG_CODE 0
  13.  
  14. @@ -204,6 +208,7 @@
  15.  int errno;
  16.  #endif // __ia64__
  17.  
  18. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
  19.  // int mlock(const void *addr, size_t len);
  20.  _syscall2(int, mlock, const void *, addr, size_t, len )
  21.  // int munlock(const void *addr, size_t len);
  22. @@ -215,6 +220,8 @@
  23.  _syscall3( int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount )
  24.  #endif
  25.  #endif
  26. +#endif
  27. +
  28.  #endif /* FGL_USE_SCT */
  29.  
  30.  #ifdef FGL_LINUX253P1_VMA_API
  31. @@ -1528,8 +1535,13 @@
  32.  
  33.      return (*sys_mlock)(start, len);
  34.  #else
  35. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
  36. +    printk(KERN_INFO "fglrx: called unsupported function: %s\n", __FUNCTION__);
  37. +    return -ENOMEM;
  38. +#else
  39.      return mlock((void*)start, len);
  40.  #endif
  41. +#endif
  42.  }
  43.  
  44.  int ATI_API_CALL __ke_sys_munlock(unsigned long start, __ke_size_t len)
  45. @@ -1543,8 +1555,13 @@
  46.  
  47.      return (*sys_munlock)(start, len);
  48.  #else
  49. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
  50. +    printk(KERN_INFO "fglrx: called unsupported function: %s\n", __FUNCTION__);
  51. +    return -ENOMEM;
  52. +#else
  53.      return munlock((void*)start, len);
  54.  #endif
  55. +#endif
  56.  }
  57.  
  58.  
  59. @@ -1562,7 +1579,12 @@
  60.      return (*sys_modify_ldt)(func, ptr, bytecount);
  61.  #else
  62.  #if !defined(__ia64__) && !defined(__x86_64__)
  63. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
  64. +    printk(KERN_INFO "fglrx: called unsupported function: %s\n", __FUNCTION__);
  65. +    return -ENOMEM;
  66. +#else
  67.      return modify_ldt(func, ptr, bytecount);
  68. +#endif
  69.  #else
  70.      // TODO: how should this be down on ia64????
  71.      return 0;
  72. @@ -5005,15 +5027,9 @@
  73.  
  74.      DBG_TRACE("destroying slab object '%s'", slabcache_obj->name);
  75.  
  76. -    if (kmem_cache_destroy(slabcache_obj->cache) == 0)
  77. -    {
  78. -        ret = 1;
  79. -        slabcache_obj->cache = NULL;
  80. -    }
  81. -    else
  82. -    {
  83. -        DBG_ERROR("destroying failed");
  84. -    }
  85. +    kmem_cache_destroy(slabcache_obj->cache);
  86. +    slabcache_obj->cache = NULL;
  87. +    ret = 1;
  88.  
  89.      DBG_LEAVE("%d", ret);
  90.      return ret;
  91.